1. Field of the Invention
The present invention relates to an image processing method and apparatus for efficiently encoding/decoding image data.
2. Related Background Art
As a moving image encoding scheme for realizing TV phones or TV conference at a low bit rate, H.261 or H.263 stipulated by the ITU is used. In these schemes, an image is divided into macro blocks each having 16xc3x9716 pixels, and DCT, motion compensation, and variable length encoding are performed in each macro block to encode the image. An encoding apparatus determines transmission or non-transmission for each macro block. For transmission, the apparatus must determine INTRA encoding (all data are encoded) or INTER encoding (only difference information is encoded). The determination scheme is not specified. In many cases, the scheme is determined on the basis of, e.g., difference information.
A conventional encoding apparatus directly encodes an image input from an image input apparatus such as a camera. The image itself is not changed to improve the encoding efficiency.
H.261 or H.263 assumes indoor images with less motion, e.g., a TV conference. Since an image is encoded using a difference image between a previous frame and a current frame, the code amount is small when the change is small.
However, the luminance of an entire indoor image finely changes due to flicker of a fluorescent lamp or the like. Hence, even when an image without any change is being sensed, the difference value becomes large because of the luminance change in the entire image, resulting in degradation in encoding efficiency. When the average luminance of the entire image largely changes due to, e.g., movement of an object, the ambient luminance is also changed by the luminance correction function of the image input apparatus. If such an input image is directly encoded, the difference value between the current and previous images becomes large even at a portion with no change such as background. This increases the code length and therefore communication cost.
As described above, in an image encoding apparatus which realizes information compression using interframe difference (INTER encoding), the code amount largely changes in accordance with the degree of change.
The present invention has been made in consideration of the above situation, and has as its object to provide an image processing apparatus and method capable of efficiently encoding input image data even when the luminance of the image data finely changes in units of frames.
According to one aspect of the present invention, there is provided an image processing apparatus/method in which image data is input, the luminance change between the input image data and the image data of a frame adjacent to the input image data is detected, the input image data is corrected in accordance with the detection result so that the luminance change from the image data of the adjacent frame becomes small, and the corrected input image data is INTER-encoded.
It is another object of the present invention to provide an image processing apparatus and method capable of faithfully restoring the original image from efficiently encoded image data.
According to another aspect of the present invention, there is provided an image processing apparatus/method in which image data which is luminance-corrected and encoded so that the luminance change between the image data and image data of an adjacent frame becomes small, the encoded image data is decoded, and luminance correction inverse to luminance correction in encoding is performed for the decoded image data.
Other objects, features and advantages of the invention will become apparent from the following detailed description taken in conjunction with the accompanying drawings.